/*
 * watched-mountpoint.hpp
 * Jeff Wicks
 */

#ifndef DEVICEID_HPP
#define DEVICEID_HPP

#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h> //for strerror(errno)
#include <stdio.h> 

#include "../../ExeptionHandler/error.hpp"

/*
 * I just created this class to clean up a pile of procedural
 * code. I can use DeviceID instead of calling stat().
 */
namespace mounts
{
	class DeviceID
	{
		dev_t device_id;
		
	public:
		DeviceID(string str);

		
		inline dev_t getID() const
		{
			return device_id;
		}
		
		inline bool operator== (const DeviceID &rhs) const
		{
			if (rhs.getID() == device_id)
			{
				return true;
			}
			else return false;
		}
	};

}//namespace mounts

#endif